<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>统计</title>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <link rel="stylesheet" href="./css/common.css">
    <!-- import Vue before Element -->
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
    <!-- import JavaScript -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script src="./js/common.js"></script>
    <script src="https://cdn.bootcss.com/echarts/4.2.1-rc1/echarts.common.min.js"></script>
</head>
<style>

</style>
<body>
<div id="app">
    <el-row>
        <el-col :span="14" :offset="5">
            <div class="container">
                <div class="button-bar">
                    <div></div>
                    <div class="return-btn" title="返回主页" @click="returnHome">
                        <el-button type="warning" size="small" plain>
                            <i class="el-icon-back"></i>
                        </el-button>
                    </div>
                </div>
                <div id="main" style="width: 600px;height:400px;"></div>
            </div>
        </el-col>
    </el-row>
</div>
</body>
<script>
    new Vue({
        el: '#app',
        data: function () {
            return {

            };
        },
        methods: {
            // 返回主页
            returnHome() {
                window.location.href = `./index.html`
            },
        },
        mounted: function () {

        }
    });

    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));

    // 指定图表的配置项和数据
    var option = {
        xAxis: {
            type: 'category',
            data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
        },
        yAxis: {
            type: 'value'
        },
        series: [{
            data: [820, 932, 901, 934, 1290, 1330, 1320],
            type: 'line'
        }]
    };

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>
</html>